from tkinten import *

root = Tk ()
root.title ("ИТ марафон")
root.geomtry ("500x500")
canvas=Canvas (bg = "white", width = 500, height = 500)
canvas.pack (anchor=CENTER, expand=1)

x = int(input("Введите смещение по x"))
y = int(input("Введите смещение по y"))
n = int(input("Введите коэфицент увеличения n: "))

if n>=0 and 0*n+x>=0 and 0*n+y>=0 and 30*n+x<=500 and 20*n+y<=500:
    x1,y1=0*n+x,0*n+y
    x1,y1=10*n+x,0*n+y
    x1,y1=10*n+x,10*n+y
    x1,y1=20*n+x,10*n+y
    x1,y1=20*n+x,0*n+y
    x1,y1=30*n+x,0*n+y
    x1,y1=30*n+x,20*n+y
    x1,y1=0*n+x,20*n+y
    canvas.create_polygon(x1,y1,x2,y2,x3,y3,x4,y4,x5,y5,x6,y6,x7,y7,x8,y8)
elif n<0 and 0*abs(n)+x>=0 and 0*abs(n)+y>=0 and 30*abs(n)+x<=500 and 20*abs(n)+y<=500:
    n=-n
    x1,y1=0*n+x,0*n+y
    x1,y1=10*n+x,0*n+y
    x1,y1=10*n+x,10*n+y
    x1,y1=20*n+x,10*n+y
    x1,y1=20*n+x,0*n+y
    x1,y1=30*n+x,0*n+y
    x1,y1=30*n+x,20*n+y
    x1,y1=0*n+x,20*n+y
    canvas.create_polygon(x1,y1,x2,y2,x3,y3,x4,y4,x5,y5,x6,y6,x7,y7,x8,y8)
else:
    print("Размер фигуры превышает максимальный размер поля")
root.mainloop()
